﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EnumHelper.cs" company="">
//   
// </copyright>
// <summary>
//   The enum helper.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace UITest.Helpers
{
    using System;

    /// <summary>
    ///     The enum helper.
    /// </summary>
    public class EnumHelper
    {
        #region Public Methods and Operators

        /// <summary>
        /// The parse enum.
        /// </summary>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <typeparam name="TEnum">
        /// Generic type
        /// </typeparam>
        /// <returns>
        /// The <see cref="TEnum"/>.
        /// </returns>
        public static TEnum ParseEnum<TEnum>(string value)
        {
            return (TEnum)Enum.Parse(typeof(TEnum), value, true);
        }

        #endregion
    }
}